home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 316 / libsrc / fread.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  313 b   |  22 lines

  1.  
  2. #include "std-guts.h"
  3.  
  4. int fread(where, how_big, how_many, f)
  5. char * where;
  6. int how_big;
  7. int how_many;
  8. struct file * f;
  9. {
  10.   int i, j, c;
  11.  
  12.   for (i = 0 ; i < how_many ; i++)
  13.     for (j = 0 ; j < how_big ; j++)
  14.         {
  15.         c = fgetc(f);
  16.         if (c == EOF)
  17.             return(i);
  18.         *where++ = c;
  19.         }
  20.   return(i);
  21. }
  22.